package com.kongyz.color;

import com.kongyz.AbstractFactorys;
import com.kongyz.fontDisplay.FontDisplayMode;
import org.apache.commons.lang3.StringUtils;

/**
 * @author kongyz
 * @date 2018/6/21 20:35
 * @Description:
 */
public class ColorFactory extends AbstractFactorys {
    @Override
    public FontDisplayMode getFont(String font) {
        return null;
    }

    @Override
    public Color getColor(String color) {
        if(!StringUtils.isNotEmpty(color)){
            return null;
        }
        if(color.equalsIgnoreCase("Red")){
            return new Red();
        }else if(color.equalsIgnoreCase("Green")){
            return new Green();
        }else if(color.equalsIgnoreCase("Blue")){
            return new Blue();
        }
        return null;
    }
}
